package hibernate;


import koor.entity.Action;
import koor.persistent.ActionDAO;
import koor.persistent.DAOFactoryImpl;
import koor.persistent.DaoFactory;
import koor.service.ServiceLocator;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Admin
 */
public class NewMain {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        DaoFactory daof = new DAOFactoryImpl();
        ServiceLocator.registerService(ActionDAO.class, daof.getActionDAO());
        Action act = new Action("act1");
        ServiceLocator.getService(ActionDAO.class).save(act);
        System.out.println(ServiceLocator.getService(ActionDAO.class).findAll().get(0).getTitle());
    }
}
